import { RolePageListGetResultModel, RolePageParams } from '../model/systemModel';
import { defHttp } from '/@/utils/http/axios';

enum Api {
  ROLE_PAGE_LIST = '/admin/roles',
  setRoleStatus = '/admin/role',
}
export const getRoleListByPage = (params?: RolePageParams) =>
  defHttp.get<RolePageListGetResultModel>({ url: Api.ROLE_PAGE_LIST, params });
export const setRoleStatus = (id: number, status: string) =>
  defHttp.put({ url: Api.setRoleStatus, params: { id, status } });
